import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    Dimensions,
    ListView,
    TouchableOpacity,
    TextInput,
    Alert,
    Platform,
    AsyncStorage,
    StatusBar,
    DeviceEventEmitter,
    ScrollView,
} from 'react-native';
import RNFetchBlob from 'react-native-fetch-blob'
import Request from '../../../jscode/common/Request'
import Picker from 'react-native-picker';
import ImagePicker from 'react-native-syan-image-picker'
import {Theme, ListRow, Overlay, Label, Button, Checkbox} from 'teaset';
import Config from '../../common/Config'
import Utils from '../../common/Utils'
import {Toast,ModalIndicator} from 'teaset';
const STORAGE_KEY_TOKEN = '@AsyncStorageDemo:key_token';
const avatarSource=[];
const {height, width} = Dimensions.get('window');
export default class ModifyLendingInformationPage extends Component {
    componentDidMount() {
        this.msgListener = DeviceEventEmitter.addListener('imageChange',(images,imageAdd) => {
            this.setState({
                images:images,
                imageAdd:imageAdd
            })
        });
        this._loadInitialState().done();
    }
    componentWillUnmount() {
        this.msgListener&&this.msgListener.remove();
    }
    async _loadInitialState(){
        try{
            let value=await AsyncStorage.getItem(STORAGE_KEY_TOKEN);
            if(value!==null){
                this._appendMessage(value);
            }else{
                this._appendMessage('');
            }
        }catch(error){
            this._appendMessage('AsyncStorage错误'+error.message);
        }
    }
    _appendMessage=(message)=>{
        if(this.props.id!==undefined){
            this.setState({
                token:this.state.token.concat(message)
            },()=>this.getInfo());
        }else {
            this.setState({
                token:this.state.token.concat(message)
            });
        }
    };
    getInfo=()=>{
        let params={
            "token":this.state.token,
            "lendingId":this.props.id
        };
        ModalIndicator.show("正在请求数据......");
        fetch(Config.baseApi+'/lending/queryOne',{
            method: 'POST',
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded',
            },
            body: Utils.getParamsString(params)
        })
            .then((response) => response.json())
            .then((responseJson) => {
                ModalIndicator.hide();
                if(responseJson.status!==1){
                    this.setState({
                        name:responseJson.data.name,
                        IDCard:responseJson.data.idCard,
                        phone:responseJson.data.phone,
                        address:responseJson.data.address,
                        area:responseJson.data.area,
                        loanMoney:responseJson.data.borrowingMoneyStr,
                        repaymentMoney:responseJson.data.repaymentMoneyStr,
                        loanTime:responseJson.data.borrowingTimeStr,
                        repaymentTime:responseJson.data.repaymentTimeStr,
                        remark:responseJson.data.remark,
                    });
                    if(responseJson.data.photoList!==null){
                        this.setState({
                            images:responseJson.data.photoList
                        })
                    }else {
                        this.setState({
                            images:[]
                        })
                    }
                }else{
                    Toast.message(responseJson.msg);
                }
            })
            .catch((error) => {
                ModalIndicator.hide();
                Toast.message(error);
            });
    };
    constructor(props) {
        super(props);
        this.state = {
            token:'',
            name:'',
            IDCard:'',
            phone:'',
            address:'',
            area:'',
            loanMoney:'',
            repaymentMoney:'',
            loanTime:'',
            repaymentTime:'',
            remark:'',
            images:[],
            max:9,
            isSelectL:false,
            isLoanTime:'',
            isRepaymentTime:'',
            imageAdd:[],
            isPhoneTrue:false,
            isIDCardTrue:false
        }
    };

    _showDateBottomPicker=()=>{
        this.setState({
            isSelect:true
        });
        Picker.init({
            pickerConfirmBtnText:'完成',
            pickerCancelBtnText:'取消',
            pickerTitleText:'',
            pickerData: this._createDateData(),
            pickerToolBarFontSize: 16,
            pickerFontSize: 16,
            pickerConfirmBtnColor:[48,144,221,1],//完成
            pickerCancelBtnColor:[48,144,221,1],
            onPickerConfirm: (pickedValue, pickedIndex) => {
                this.setState({
                    repaymentTime:pickedValue[0]+pickedValue[1]+pickedValue[2],
                    isSelect:false
                })
            },
            onPickerCancel: (pickedValue, pickedIndex) => {
                this.setState({
                    isSelect:false
                })
            },
        });
        Picker.show();
    };

    _createDateData=()=> {
        let date = [];
        for(let i=1970;i<2070;i++){
            let month = [];
            for(let j = 1;j<13;j++){
                let day = [];
                if(j === 2){
                    for(let k=1;k<29;k++){
                        day.push(k+'日');
                    }
                    //Leap day for years that are divisible by 4, such as 2000, 2004
                    if(i%4 === 0){
                        day.push(29+'日');
                    }
                }
                else if(j in {1:1, 3:1, 5:1, 7:1, 8:1, 10:1, 12:1}){
                    for(let k=1;k<32;k++){
                        day.push(k+'日');
                    }
                }
                else{
                    for(let k=1;k<31;k++){
                        day.push(k+'日');
                    }
                }
                let _month = {};
                _month[j+'月'] = day;
                month.push(_month);
            }
            let _date = {};
            _date[i+'年'] = month;
            date.push(_date);
        }
        return date;
    };

    _showDatePicker=()=> {
        this.setState({
            isSelect:true
        });
        Picker.init({
            pickerConfirmBtnText:'完成',
            pickerCancelBtnText:'取消',
            pickerTitleText:'',
            pickerData: this._createDateData(),
            pickerToolBarFontSize: 16,
            pickerFontSize: 16,
            pickerConfirmBtnColor:[48,144,221,1],//完成
            pickerCancelBtnColor:[48,144,221,1],
            onPickerConfirm: (pickedValue, pickedIndex) => {
                this.setState({
                    loanTime:pickedValue[0]+pickedValue[1]+pickedValue[2],
                    isSelect:false
                })
            },
            onPickerCancel: (pickedValue, pickedIndex) => {
                this.setState({
                    isSelect:false
                })
            },
        });
        Picker.show();
    };


    showPop=(type, modal, text)=>{
        let overlayView = (
            <Overlay.PopView
                style={{alignItems: 'center', justifyContent: 'center'}}
                type={type}
                modal={modal}
                ref={v => this.overlayPopView = v}
            >
                <View style={{backgroundColor: Theme.defaultColor,width:230, alignItems: 'center',borderRadius:10}}>
                    <TouchableOpacity   style={[styles.overlay,{borderTopRightRadius:10, borderTopLeftRadius:10}]}
                                        onPress={() => this.pickSingleWithCamera()}>
                        <Text style={styles.PopMsg}>拍照</Text>
                    </TouchableOpacity>
                    <View style={{height:1,borderColor:'#eeeff0',width:230}}/>
                    <TouchableOpacity  style={styles.overlay}
                                       onPress={() => this.openPicLib()}>
                        <Text style={styles.PopMsg}>从手机相册中选择</Text>
                    </TouchableOpacity>
                    <TouchableOpacity  style={styles.overlay1}
                                       onPress={() => this.overlayPopView && this.overlayPopView.close()}>
                        <Text style={[styles.PopMsg,{color:'#233333'}]}>取消</Text>
                    </TouchableOpacity>
                </View>
            </Overlay.PopView>
        );
        Overlay.show(overlayView);
    };

    pickSingleWithCamera=()=> {
        this.overlayPopView && this.overlayPopView.close();
        const options = {
            imageCount: 9,             // 最大选择图片数目，默认6
            isCamera: true,            // 是否允许用户在内部拍照，默认true
            isCrop: false,             // 是否允许裁剪，默认false
        };
        ImagePicker.asyncShowImagePicker(options)
            .then(photos => {
                for ( let i=0;i<photos.length;i++) {
                    avatarSource.push({
                        uri: photos[i].uri,
                        width: photos[i].width,
                        height: photos[i].height,
                        mime: photos[i].mime,
                        status:2
                    });
                }
                let Num=avatarSource.length;
                if(Num>9){
                    avatarSource.splice(9,Num-9)
                }
                this.setState({
                    imageAdd: avatarSource
                });
            })
            .catch(err => {
                Toast.message(JSON.stringify(err))
            });

    };

    openPicLib=()=> {
        this.overlayPopView && this.overlayPopView.close();
        const options = {
            imageCount: 9,             // 最大选择图片数目，默认6
            isCamera: true,            // 是否允许用户在内部拍照，默认true
            isCrop: false,             // 是否允许裁剪，默认false
        };

        ImagePicker.asyncShowImagePicker(options)
            .then(photos => {
                for ( let i=0;i<photos.length;i++) {
                    avatarSource.push({
                        uri: photos[i].uri,
                        width: photos[i].width,
                        height: photos[i].height,
                        mime: photos[i].mime,
                        status:2
                    });
                }
                let Num=avatarSource.length;
                if(Num>9){
                    avatarSource.splice(9,Num-9)
                }
                this.setState({
                    imageAdd: avatarSource
                });
            })
            .catch(err => {
                Toast.message(JSON.stringify(err));
            });

    };

    preservation=()=>{
        if(this.props.id!==undefined){
            if(this.state.name!=''&this.state.address!=''&this.state.area!=''&this.state.loanTime!=''&
                this.state.loanMoney!=''& this.state.repaymentMoney!=''& this.state.loanTime!=''& this.state.repaymentTime!=''){
                const body=[{name:"idCard",data:this.state.IDCard},
                    {name:"name",data:this.state.name},{name:"phone",data:this.state.phone},{name:"address",data:this.state.address},
                    {name:"area",data:this.state.area},{name:"borrowingTimeStr",data:this.state.loanTime},{name:"token",data:this.state.token},
                    {name:"repaymentTimeStr",data:this.state.repaymentTime},{name:"borrowingMoney",data:this.state.loanMoney},
                    {name:"repaymentMoney",data:this.state.repaymentMoney},{name:"isLostStr",data:this.state.isLose},{name:"id",data:this.props.id},
                    {name:"isRepaymentStr",data:this.state.isRepayment},{name:"isPublic",data:false},{name:"remark",data:this.state.remark}];
                if(this.state.imageAdd!=[]){
                    for(let i=0;i<this.state.imageAdd.length;i++){
                        body.push(
                            {data:RNFetchBlob.wrap(this.state.imageAdd[i].uri),filename:'file',name:'file'}
                        )
                    }
                }
                if(this.state.images!=[]){
                    for(let i=0;i<this.state.images.length;i++){
                        body.push(
                            {data:this.state.images[i].name,name:'photoList'}
                        )
                    }
                }
                Request.upload(Config.baseApi+'/lending/uploadArrearsAndGetId',body,(progress)=>{

                },(data)=>{
                    if(data.status==0){
                        avatarSource.splice(0,avatarSource.length);
                        Actions.ArrearsDetailedInformationPage({id:data.data})
                    }else {
                        Toast.message(data.msg)
                    }
                },(error)=>{
                    Toast.message(JSON.stringify(error));
                });
            }else {
                Toast.message('请输入详细信息')
            }
        }else {
            if(this.state.name!=''&this.state.isIDCardTrue!=true){
                const body=[{name:"idCard",data:this.state.IDCard},
                    {name:"name",data:this.state.name},{name:"phone",data:this.state.phone},{name:"address",data:this.state.address},
                    {name:"area",data:this.state.area},{name:"borrowingTimeStr",data:this.state.loanTime},{name:"token",data:this.state.token},
                    {name:"repaymentTimeStr",data:this.state.repaymentTime},{name:"borrowingMoney",data:this.state.loanMoney},
                    {name:"repaymentMoney",data:this.state.repaymentMoney},{name:"isLost",data:this.state.isLose},
                    {name:"isRepayment",data:this.state.isRepayment},{name:"isPublic",data:false},{name:"remark",data:this.state.remark}];
                if(this.state.imageAdd!=[]){
                    for(let i=0;i<this.state.imageAdd.length;i++){
                        body.push(
                            {data:RNFetchBlob.wrap(this.state.imageAdd[i].uri),filename:'file',name:'file'}
                        )
                    }
                }
                if(this.state.images!=[]){
                    for(let i=0;i<this.state.images.length;i++){
                        body.push(
                            {data:this.state.images[i].name,name:'photoList'}
                        )
                    }
                }
                Request.upload(Config.baseApi+'/lending/uploadArrearsAndGetId',body,(progress)=>{

                },(data)=>{
                    if(data.status==0){
                        avatarSource.splice(0,avatarSource.length);
                        Actions.ArrearsDetailedInformationPage({id:data.data})
                    }else {
                        Toast.message(data.msg)
                    }
                },(error)=>{
                    Toast.message(JSON.stringify(error));
                });
            }else {
                Toast.message('请输入详细信息')
            }
        }
    };


    isPhone=()=>{
        let regex = /^1(3|4|5|7|8)\d{9}$/;
        let checkPhone=regex.test(this.state.phone);
        if(checkPhone!==true){
            this.setState({
                isPhoneTrue:false
            })
        }else {
            this.setState({
                isPhoneTrue:true
            })
        }
    };


    isIDCard=()=>{
        let isIDCard=/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
        let checkIDCard=isIDCard.test(this.state.IDCard);
        if(checkIDCard===false){
            this.setState({
                isIDCardTrue:false
            })
        }else {
            this.setState({
                isIDCardTrue:true
            })
        }
    };

    render() {
        return (
            <View style={styles.container}>
                <StatusBar
                    backgroundColor='white'
                    barStyle={'dark-content'}/>
                {this.state.isSelect
                    ?(<TouchableOpacity
                        onPress={()=>this.setState({
                            isSelect:false
                        },()=>Picker.hide())}
                        style={{position: 'absolute',top:0, bottom:0,left:0,right:0,
                            backgroundColor:'#000000',opacity:0.2,zIndex:2}}/>)
                    :(null)}
                <View style={styles.titleView}>
                    <Text style={styles.titleMsg}>个人资料</Text>
                    <TouchableOpacity
                        onPress={()=>Actions.pop()&&avatarSource.splice(0,avatarSource.length)}
                        style={styles.goBackView}>
                        <Image
                            source={ImageUtil.GoBack}
                            style={styles.goBackImg}/>
                    </TouchableOpacity>
                    <TouchableOpacity
                        onPress={()=>this.preservation()}
                        style={styles.completeView}>
                        <Text style={styles.completeMsg}>保存</Text>
                    </TouchableOpacity>
                </View>
                <ScrollView>
                    <View style={styles.dataView}>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>姓        名</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TextInput
                                ref={ (ref)=>this.nameTextInput = ref }
                                autoCapitalize={"none"}
                                underlineColorAndroid={'transparent'}
                                defaultValue={this.state.name}
                                placeholder="请输入姓名"
                                placeholderTextColor='#b2b2b2'
                                autoCorrect={false}
                                style={styles.textInputView}
                                onChangeText={(text)=>{
                                    this.setState({
                                        name:text,
                                    })
                                }}/>
                        </View>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>身份证号</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TextInput
                                ref={ (ref)=>this.IDCardTextInput = ref }
                                autoCapitalize={"none"}
                                underlineColorAndroid={'transparent'}
                                defaultValue={this.state.IDCard}
                                placeholder="请输入身份证号"
                                placeholderTextColor='#b2b2b2'
                                autoCorrect={false}
                                style={styles.textInputView}
                                onChangeText={(text)=>{
                                    this.setState({
                                        IDCard:text,
                                    },()=>this.isIDCard())
                                }}/>
                        </View>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>手机号码</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TextInput
                                ref={ (ref)=>this.phoneTextInput = ref }
                                autoCapitalize={"none"}
                                underlineColorAndroid={'transparent'}
                                defaultValue={this.state.phone}
                                keyboardType={"numeric"}
                                placeholder="请输入手机号"
                                placeholderTextColor='#b2b2b2'
                                autoCorrect={false}
                                style={styles.textInputView}
                                onChangeText={(text)=>{
                                    this.setState({
                                        phone:text,
                                    },()=>this.isPhone())
                                }}/>
                        </View>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>户口地址</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TextInput
                                ref={ (ref)=>this.addressTextInput = ref }
                                autoCapitalize={"none"}
                                underlineColorAndroid={'transparent'}
                                defaultValue={this.state.address}
                                placeholder="请填写户口所在地"
                                placeholderTextColor='#b2b2b2'
                                autoCorrect={false}
                                style={styles.textInputView}
                                onChangeText={(text)=>{
                                    this.setState({
                                        address:text,
                                    })
                                }}/>
                        </View>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>所在地区</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TextInput
                                ref={ (ref)=>this.areaTextInput = ref }
                                autoCapitalize={"none"}
                                underlineColorAndroid={'transparent'}
                                defaultValue={this.state.area}
                                placeholder="请填写所在地区"
                                placeholderTextColor='#b2b2b2'
                                autoCorrect={false}
                                style={styles.textInputView}
                                onChangeText={(text)=>{
                                    this.setState({
                                        area:text,
                                    })
                                }}/>
                        </View>
                        <View style={styles.labelView}>
                            <Text style={styles.labelLabellingMsg}>借款日期</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TouchableOpacity
                                style={{width:130,height:40,justifyContent:'center'}}
                                onPress={()=>this._showDatePicker()}>
                                {this.state.loanTime===''
                                    ?(<View style={{flexDirection:'row',alignItems:'center'}}>
                                        <Text style={[styles.labelInformationMsg,{marginLeft:33}]}>请选择</Text>
                                        <Image
                                            style={{marginLeft:18}}
                                            source={ImageUtil.DropDown}/>
                                    </View>)
                                    :(<Text style={styles.labelInformationMsg}>{this.state.loanTime}</Text>)}
                            </TouchableOpacity>
                            <Text style={styles.labelMsg}>借款金额</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <View style={{height:40,width:100,justifyContent:'center',alignItems:'center'}}>
                                <TextInput
                                    ref={ (ref)=>this.loanMoneyTextInput = ref }
                                    autoCapitalize={"none"}
                                    underlineColorAndroid={'transparent'}
                                    keyboardType={"numeric"}
                                    defaultValue={this.state.loanMoney}
                                    maxLength={this.state.max}
                                    placeholder="输入欠款数"
                                    placeholderTextColor='#b2b2b2'
                                    autoCorrect={false}
                                    style={styles.textInputChangeView}
                                    onChangeText={(text)=>{
                                        this.setState({
                                            loanMoney:text,
                                        },()=>this.inputLoan(text));
                                    }}/>
                            </View>
                        </View>
                        <View style={[styles.labelView,{borderBottomWidth:0}]}>
                            <Text style={styles.labelLabellingMsg}>还款日期</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <TouchableOpacity
                                style={{width:130,height:40,justifyContent:'center'}}
                                onPress={()=>this._showDateBottomPicker()}>
                                {this.state.repaymentTime===''
                                    ?(<View style={{flexDirection:'row',alignItems:'center'}}>
                                        <Text style={[styles.labelInformationMsg,{marginLeft:33}]}>请选择</Text>
                                        <Image
                                            style={{marginLeft:18}}
                                            source={ImageUtil.DropDown}/>
                                    </View>)
                                    :(<Text style={styles.labelInformationMsg}>{this.state.repaymentTime}</Text>)}
                            </TouchableOpacity>
                            <Text style={styles.labelMsg}>还款金额</Text>
                            <Text style={styles.symbolMsg}>:</Text>
                            <View style={{height:40,width:100,justifyContent:'center',alignItems:'center'}}>
                                <TextInput
                                    ref={ (ref)=>this.repaymentMoneyTextInput = ref }
                                    autoCapitalize={"none"}
                                    underlineColorAndroid={'transparent'}
                                    keyboardType={"numeric"}
                                    maxLength={this.state.max}
                                    defaultValue={this.state.repaymentMoney}
                                    placeholder="输入还款数"
                                    placeholderTextColor='#b2b2b2'
                                    autoCorrect={false}
                                    style={styles.textInputChangeView}
                                    onChangeText={(text)=>{
                                        this.setState({
                                            repaymentMoney:text,
                                        },()=>this.inputRepayment(text));
                                    }}/>
                            </View>
                        </View>
                    </View>
                    <View>
                        <Text style={{marginTop:18,marginLeft:15,marginBottom:13,fontSize:27/2}}>备注</Text>
                    </View>
                    <View style={styles.remarkView}>
                        <TextInput
                            ref={ (ref)=>this.remarkTextInput = ref }
                            multiline={true}
                            autoCapitalize={"none"}
                            underlineColorAndroid={'transparent'}
                            defaultValue={this.state.remark}
                            placeholder="请输入此人借款情况描述"
                            placeholderTextColor='#b2b2b2'
                            autoCorrect={false}
                            style={styles.remarkMsg}
                            onChangeText={(text)=>{
                                this.setState({
                                    remark:text,
                                })
                            }}/>
                        <View style={styles.allImgView}>
                            {this.state.images
                                ? this.state.images.map((i,index) =>
                                    <View key={index}>
                                        {this.renderImage(i,this.state.images)}
                                    </View>)
                                : null}
                            {this.state.imageAdd
                                ? this.state.imageAdd.map((i,index) =>
                                    <View key={index}>
                                        {this.renderImage(i,this.state.imageAdd)}
                                    </View>)
                                : null}
                            <TouchableOpacity onPress={()=>this.showPop('zoomOut', true, 'Pop modal')}>
                                <Image
                                    source={ImageUtil.AddImage}
                                    style={styles.remarkImg}/>
                            </TouchableOpacity>
                        </View>
                    </View>
                    <View style={{height:40}}/>
                </ScrollView>
            </View>
        );
    }

    renderImage=(image,images)=> {
        return (<TouchableOpacity onPress={()=>Actions.DeleteImgPage({images:this.state.images,imageAdd:this.state.imageAdd,status:1})}>
            <Image style={styles.remarkImg}
                   source={image.uri?image:{uri:"http://106.14.209.177/upload/"+image.name}} />
        </TouchableOpacity>)
    };

    inputLoan=(text)=>{
        let a=[];
        if(text[0]==0){
            if(text[1]!='.'){
                this.setState({
                    loanMoney:text[0]
                })
            }
        }
        if(text[a[0]]!=='.'){
            this.setState({
                max:9
            })
        }
        if(text[0]=='.'){
            this.setState({
                loanMoney:''
            })
        }
        for(let i=0;i<text.length;i++){
            if(text[i]==='.'){
                a.push(i);
                this.setState({
                    max:a[0]+3
                });
                if(a[1]){
                    this.setState({
                        loanMoney:text.substr(0,a[1])
                    })
                }
            }
        }
    };

    inputRepayment=(text)=>{
        let a=[];
        if(text[0]==0){
            if(text[1]!='.'){
                this.setState({
                    repaymentMoney:text[0]
                })
            }
        }
        if(text[a[0]]!=='.'){
            this.setState({
                max:9
            })
        }
        if(text[0]=='.'){
            this.setState({
                repaymentMoney:''
            })
        }
        for(let i=0;i<text.length;i++){
            if(text[i]==='.'){
                a.push(i);
                this.setState({
                    max:a[0]+3
                });
                if(a[1]){
                    this.setState({
                        repaymentMoney:text.substr(0,a[1])
                    })
                }
            }
        }
    };
}

const styles = StyleSheet.create({
    container: {
        flex:1,
        backgroundColor:'#f0f0f0'
    },
    titleView:{
        height:Platform.OS==='ios'?64:44,
        backgroundColor:'#ffffff',
        alignItems:'center',
        justifyContent:'center',
        borderBottomWidth:1,
        borderColor:'#e4e4e4'
    },
    titleMsg:{
        fontSize:17,
        color:'#000000',
        marginTop:Platform.OS==='ios'?34:14,
        marginBottom:29/2
    },
    goBackView:{
        position: 'absolute',
        top:Platform.OS==='ios'?65/2:25/2,left:15,
    },
    goBackImg:{
        height:18,
        width:18
    },
    completeView:{
        position: 'absolute',
        right:15,bottom:Platform.OS==='ios'?29/2:12
    },
    completeMsg:{
        color:'#3090dd',
        fontSize:17
    },
    backgroundImg:{
        marginTop:112,
        height:185,
        width:185
    },
    dataView:{
        backgroundColor:'#ffffff',
        marginTop:10,
        alignItems:'center',
        borderBottomWidth:1,
        borderColor:'#cacaca'
    },
    labelView:{
        flexDirection:'row',
        alignItems:'center',
        width:width-30,
        height:44,
        borderBottomWidth:1,
        borderColor:'#e2e2e2'
    },
    labelLabellingMsg:{
        fontSize:27/2,
        color:'#000000'
    },
    symbolMsg:{
        marginLeft:10,
        fontSize:27/2
    },
    labelInformationMsg:{
        marginLeft:17,
        fontSize:27/2,
        color:'#646464'
    },
    remarkView:{
        backgroundColor:'#ffffff',
        borderRadius:5,
        width:width-30,
        marginLeft:15,
    },
    remarkMsg:{
        marginTop:14,
        marginLeft:18,
        fontSize:27/2,
        width:width-66,
        height:50,
        padding:0
    },
    allImgView:{
        marginTop:10,
        marginLeft:13,
        flexDirection:'row',
        width:width-60,
        flexWrap:'wrap'
    },
    remarkImg:{
        marginLeft:10,
        marginBottom:10,
        height:64,
        width:64,
        borderRadius:5
    },
    labelMsg:{
        fontSize:27/2,
        color:'#000000',
    },
    judgmentImg:{
        marginLeft:17,
        height:25/2,
        width:25/2
    },
    textInputView:{
        marginLeft:13,
        fontSize:27/2,
        height:44,
        width:width-195/2,
        padding:0
    },
    textInputChangeView:{
        marginLeft:12,
        fontSize:27/2,
        height:44,
        width:100,
        padding:0
    },
    overlay:{
        height:44,
        width:230,
        borderBottomWidth:1,
        borderColor:'#eeeff0',
        alignItems:'center',
        justifyContent:'center'
    },
    overlay1:{
        height:44,
        width:230,
        borderWidth:0,
        borderRadius:10,
        alignItems:'center',
        justifyContent:'center'
    },
    PopMsg:{
        textAlign:'center',
        fontSize:14,
        color:'#6590ff',
    },
});
